# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2021年12月01日
"""
import pandas as pd
import numpy as np

pd.set_option('display.unicode.east_asian_width',True)
df = pd.DataFrame({
    'col1': ['A', 'A', 'B', np.nan, 'D', 'C'],
    'col2': [2, 1, 9, 8, 7, 4],
    'col3': [0, 1, 9, 4, 2, 3],
    'col4': ['a', 'B', 'c', 'D', 'e', 'F']
})
print(df)
print("="*30)
df.sort_values(by='col4', key=lambda col: col.str.lower())
print(df)
